package com.lovely602.ai.openai.config;


import org.springframework.ai.chat.client.ChatClient;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @author lizhixing
 */
@Configuration
public class AiConfig {

    @ConditionalOnMissingBean
    @Bean
    public ChatClient chatClient(ChatClient.Builder builder) {

        return builder.defaultSystem("你是一名有着多年工作经验的JAVA程序员，你的名字叫老李。")
                .build();
    }

}
